// import request from '@/utils/request'

export function login(data) {
  return new Promise((resovle, reject) => {
    resovle({
      code: 20000,
      data: {
        token: 'admin-token'
      }
    })
  })
}

export function getInfo(token) {
  return new Promise((resovle, reject) => {
    resovle({
      code: 20000,
      data: {
        avatar: 'https://wpimg.wallstcn.com/f778738c-e4f8-4870-b634-56703b4acafe.gif',
        introduction: 'I am a super administrator',
        name: 'Super Admin',
        roles: ['admin']
      }
    })
  })
}

export function logout() {
  return new Promise((resovle, reject) => {
    resovle({
      code: 20000,
      data: 'success'
    })
  })
}
